home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 151-175 / disk_166 / autograf / optwind.h < prev    next >
C/C++ Source or Header  |  1992-05-06  |  13KB  |  375 lines

  1. /*
  2.  * optwind.h : data for the option input window.
  3.  *             created with PowerWindows, but much modified.
  4.  */
  5.  
  6. #define XOPT 6L        /* constants for moving the whole mess around */
  7. #define YOPT 15L
  8.  
  9.  
  10. extern struct TextAttr TOPAZ60;
  11. extern struct TextAttr TOPAZ80;
  12.  
  13. UBYTE UNDOBUFFER1[5];
  14. UBYTE UNDOBUFFER2[5];
  15.  
  16. SHORT BorderVectors1[] = {
  17.     0,0,
  18.     26,0,
  19.     26,19,
  20.     0,19,
  21.     0,1
  22. };
  23. struct Border Border1 = {
  24.     -2,-2,    /* XY origin relative to container TopLeft */
  25.     3,0,COMPLEMENT,    /* front pen, back pen and drawmode */
  26.     5,    /* number of XY vectors */
  27.     BorderVectors1,    /* pointer to XY vectors */
  28.     NULL    /* next border in list */
  29. };
  30.  
  31. struct IntuiText IText1 = {
  32.     2,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  33.     2,4,    /* XY origin relative to container TopLeft */
  34.     &TOPAZ60,    /* font pointer or NULL for default */
  35.     (UBYTE *)"OK",    /* pointer to text */
  36.     NULL    /* next IntuiText structure */
  37. };
  38.  
  39. struct Gadget Gadget7 = {
  40.     NULL,    /* next gadget */
  41.     XOPT+67,YOPT+138,    /* origin XY of hit box relative to window TopLeft */
  42.     22,16,    /* hit box width and height */
  43.     NULL,    /* gadget flags */
  44.     RELVERIFY,    /* activation flags */
  45.     BOOLGADGET,    /* gadget type flags */
  46.     (APTR)&Border1,    /* gadget border or image to be rendered */
  47.     NULL,    /* alternate imagery for selection */
  48.     &IText1,    /* first IntuiText structure */
  49.     NULL,    /* gadget mutual-exclude long word */
  50.     NULL,    /* SpecialInfo structure */
  51.     NULL,    /* user-definable data */
  52.     NULL    /* pointer to user-definable data */
  53. };
  54.  
  55. SHORT BorderVectors2[] = {
  56.     0,0,
  57.     52,0,
  58.     52,11,
  59.     0,11,
  60.     0,0
  61. };
  62. struct Border Border2 = {
  63.     -2,-1,    /* XY origin relative to container TopLeft */
  64.     3,0,JAM1,    /* front pen, back pen and drawmode */
  65.     5,    /* number of XY vectors */
  66.     BorderVectors2,    /* pointer to XY vectors */
  67.     NULL    /* next border in list */
  68. };
  69.  
  70. struct IntuiText IText2 = {
  71.     3,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  72.     14,1,    /* XY origin relative to container TopLeft */
  73.     NULL,    /* font pointer or NULL for default */
  74.     (UBYTE *)"ALL",    /* pointer to text */
  75.     NULL    /* next IntuiText structure */
  76. };
  77.  
  78. struct Gadget Gadget6 = {
  79.     &Gadget7,    /* next gadget */
  80.     XOPT+84,YOPT+118,    /* origin XY of hit box relative to window TopLeft */
  81.     49,10,    /* hit box width and height */
  82.     SELECTED,    /* gadget flags */
  83.     TOGGLESELECT,    /* activation flags */
  84.     BOOLGADGET,    /* gadget type flags */
  85.     (APTR)&Border2,    /* gadget border or image to be rendered */
  86.     NULL,    /* alternate imagery for selection */
  87.     &IText2,    /* first IntuiText structure */
  88.     NULL,    /* gadget mutual-exclude long word */
  89.     NULL,    /* SpecialInfo structure */
  90.     NULL,    /* user-definable data */
  91.     NULL    /* pointer to user-definable data */
  92. };
  93.  
  94. SHORT BorderVectors3[] = {
  95.     0,0,
  96.     52,0,
  97.     52,11,
  98.     0,11,
  99.     0,0
  100. };
  101. struct Border Border3 = {
  102.     -2,-1,    /* XY origin relative to container TopLeft */
  103.     3,0,JAM1,    /* front pen, back pen and drawmode */
  104.     5,    /* number of XY vectors */
  105.     BorderVectors3,    /* pointer to XY vectors */
  106.     NULL    /* next border in list */
  107. };
  108.  
  109. struct IntuiText IText3 = {
  110.     3,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  111.     6,1,    /* XY origin relative to container TopLeft */
  112.     NULL,    /* font pointer or NULL for default */
  113.     (UBYTE *)"$/gal",    /* pointer to text */
  114.     NULL    /* next IntuiText structure */
  115. };
  116.  
  117. struct Gadget Gadget5 = {
  118.     &Gadget6,    /* next gadget */
  119.     XOPT+18,YOPT+118,    /* origin XY of hit box relative to window TopLeft */
  120.     49,10,    /* hit box width and height */
  121.     NULL,    /* gadget flags */
  122.     TOGGLESELECT,    /* activation flags */
  123.     BOOLGADGET,    /* gadget type flags */
  124.     (APTR)&Border3,    /* gadget border or image to be rendered */
  125.     NULL,    /* alternate imagery for selection */
  126.     &IText3,    /* first IntuiText structure */
  127.     NULL,    /* gadget mutual-exclude long word */
  128.     NULL,    /* SpecialInfo structure */
  129.     NULL,    /* user-definable data */
  130.     NULL    /* pointer to user-definable data */
  131. };
  132.  
  133. SHORT BorderVectors4[] = {
  134.     0,0,
  135.     52,0,
  136.     52,11,
  137.     0,11,
  138.     0,0
  139. };
  140. struct Border Border4 = {
  141.     -2,-1,    /* XY origin relative to container TopLeft */
  142.     3,0,JAM1,    /* front pen, back pen and drawmode */
  143.     5,    /* number of XY vectors */
  144.     BorderVectors4,    /* pointer to XY vectors */
  145.     NULL    /* next border in list */
  146. };
  147.  
  148. struct IntuiText IText4 = {
  149.     3,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  150.     2,1,    /* XY origin relative to container TopLeft */
  151.     NULL,    /* font pointer or NULL for default */
  152.     (UBYTE *)"mi/gal",    /* pointer to text */
  153.     NULL    /* next IntuiText structure */
  154. };
  155.  
  156. struct Gadget Gadget4 = {
  157.     &Gadget5,    /* next gadget */
  158.     XOPT+84,YOPT+99,    /* origin XY of hit box relative to window TopLeft */
  159.     49,10,    /* hit box width and height */
  160.     NULL,    /* gadget flags */
  161.     TOGGLESELECT,    /* activation flags */
  162.     BOOLGADGET,    /* gadget type flags */
  163.     (APTR)&Border4,    /* gadget border or image to be rendered */
  164.     NULL,    /* alternate imagery for selection */
  165.     &IText4,    /* first IntuiText structure */
  166.     NULL,    /* gadget mutual-exclude long word */
  167.     NULL,    /* SpecialInfo structure */
  168.     NULL,    /* user-definable data */
  169.     NULL    /* pointer to user-definable data */
  170. };
  171.  
  172. SHORT BorderVectors5[] = {
  173.     0,0,
  174.     52,0,
  175.     52,11,
  176.     0,11,
  177.     0,0
  178. };
  179. struct Border Border5 = {
  180.     -2,-1,    /* XY origin relative to container TopLeft */
  181.     3,0,JAM1,    /* front pen, back pen and drawmode */
  182.     5,    /* number of XY vectors */
  183.     BorderVectors5,    /* pointer to XY vectors */
  184.     NULL    /* next border in list */
  185. };
  186.  
  187. struct IntuiText IText5 = {
  188.     3,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  189.     9,1,    /* XY origin relative to container TopLeft */
  190.     &TOPAZ80,    /* font pointer or NULL for default */
  191.     (UBYTE *)"$/mi",    /* pointer to text */
  192.     NULL    /* next IntuiText structure */
  193. };
  194.  
  195. struct Gadget Gadget3 = {
  196.     &Gadget4,    /* next gadget */
  197.     XOPT+18,YOPT+99,    /* origin XY of hit box relative to window TopLeft */
  198.     49,10,    /* hit box width and height */
  199.     NULL,    /* gadget flags */
  200.     TOGGLESELECT,    /* activation flags */
  201.     BOOLGADGET,    /* gadget type flags */
  202.     (APTR)&Border5,    /* gadget border or image to be rendered */
  203.     NULL,    /* alternate imagery for selection */
  204.     &IText5,    /* first IntuiText structure */
  205.     NULL,    /* gadget mutual-exclude long word */
  206.     NULL,    /* SpecialInfo structure */
  207.     NULL,    /* user-definable data */
  208.     NULL    /* pointer to user-definable data */
  209. };
  210.  
  211. UBYTE Gadget2SIBuff[5] =
  212.     "";
  213. struct StringInfo Gadget2SInfo = {
  214.     Gadget2SIBuff,    /* buffer where text will be edited */
  215.     UNDOBUFFER1,    /* optional undo buffer */
  216.     0,    /* character position in buffer */
  217.     5,    /* maximum number of characters to allow */
  218.     0,    /* first displayed character buffer position */
  219.     0,0,0,0,0,    /* Intuition initialized and maintained variables */
  220.     0,    /* Rastport of gadget */
  221.     0,    /* initial value for integer gadgets */
  222.     NULL    /* alternate keymap (fill in if you set the flag) */
  223. };
  224.  
  225. SHORT BorderVectors6[] = {
  226.     0,0,
  227.     55,0,
  228.     55,16,
  229.     0,16,
  230.     0,1
  231. };
  232. struct Border Border6 = {
  233.     -3,-4,    /* XY origin relative to container TopLeft */
  234.     3,0,COMPLEMENT,    /* front pen, back pen and drawmode */
  235.     5,    /* number of XY vectors */
  236.     BorderVectors6,    /* pointer to XY vectors */
  237.     NULL    /* next border in list */
  238. };
  239.  
  240. struct Gadget Gadget2 = {
  241.     &Gadget3,    /* next gadget */
  242.     XOPT+84,YOPT+60,    /* origin XY of hit box relative to window TopLeft */
  243.     48,21,    /* hit box width and height */
  244.     NULL,    /* gadget flags */
  245.     RELVERIFY+STRINGCENTER,    /* activation flags */
  246.     STRGADGET,    /* gadget type flags */
  247.     (APTR)&Border6,    /* gadget border or image to be rendered */
  248.     NULL,    /* alternate imagery for selection */
  249.     NULL,    /* first IntuiText structure */
  250.     NULL,    /* gadget mutual-exclude long word */
  251.     (APTR)&Gadget2SInfo,    /* SpecialInfo structure */
  252.     NULL,    /* user-definable data */
  253.     NULL    /* pointer to user-definable data */
  254. };
  255.  
  256. UBYTE Gadget1SIBuff[5] =
  257.     "";
  258. struct StringInfo Gadget1SInfo = {
  259.     Gadget1SIBuff,    /* buffer where text will be edited */
  260.     UNDOBUFFER2,    /* optional undo buffer */
  261.     0,    /* character position in buffer */
  262.     5,    /* maximum number of characters to allow */
  263.     0,    /* first displayed character buffer position */
  264.     0,0,0,0,0,    /* Intuition initialized and maintained variables */
  265.     0,    /* Rastport of gadget */
  266.     0,    /* initial value for integer gadgets */
  267.     NULL    /* alternate keymap (fill in if you set the flag) */
  268. };
  269.  
  270. SHORT BorderVectors7[] = {
  271.     0,0,
  272.     56,0,
  273.     56,16,
  274.     0,16,
  275.     0,1
  276. };
  277. struct Border Border7 = {
  278.     -4,-4,    /* XY origin relative to container TopLeft */
  279.     3,0,COMPLEMENT,    /* front pen, back pen and drawmode */
  280.     5,    /* number of XY vectors */
  281.     BorderVectors7,    /* pointer to XY vectors */
  282.     NULL    /* next border in list */
  283. };
  284.  
  285. struct Gadget Gadget1 = {
  286.     &Gadget2,    /* next gadget */
  287.     XOPT+16,YOPT+60,    /* origin XY of hit box relative to window TopLeft */
  288.     50,14,    /* hit box width and height */
  289.     NULL,    /* gadget flags */
  290.     RELVERIFY+STRINGCENTER,    /* activation flags */
  291.     STRGADGET,    /* gadget type flags */
  292.     (APTR)&Border7,    /* gadget border or image to be rendered */
  293.     NULL,    /* alternate imagery for selection */
  294.     NULL,    /* first IntuiText structure */
  295.     NULL,    /* gadget mutual-exclude long word */
  296.     (APTR)&Gadget1SInfo,    /* SpecialInfo structure */
  297.     NULL,    /* user-definable data */
  298.     NULL    /* pointer to user-definable data */
  299. };
  300.  
  301. #define GadgetList1 Gadget1
  302.  
  303. struct IntuiText IText10 = {
  304.     3,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  305.     XOPT+22,YOPT+80,    /* XY origin relative to container TopLeft */
  306.     NULL,    /* font pointer or NULL for default */
  307.     (UBYTE *)"Type of Graph",    /* pointer to text */
  308.     NULL    /* next IntuiText structure */
  309. };
  310.  
  311. struct IntuiText IText9 = {
  312.     3,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  313.     XOPT+93,YOPT+46,    /* XY origin relative to container TopLeft */
  314.     NULL,    /* font pointer or NULL for default */
  315.     (UBYTE *)"End",    /* pointer to text */
  316.     &IText10    /* next IntuiText structure */
  317. };
  318.  
  319. struct IntuiText IText8 = {
  320.     3,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  321.     XOPT+16,YOPT+45,    /* XY origin relative to container TopLeft */
  322.     NULL,    /* font pointer or NULL for default */
  323.     (UBYTE *)"Start",    /* pointer to text */
  324.     &IText9    /* next IntuiText structure */
  325. };
  326.  
  327. struct IntuiText IText7 = {
  328.     3,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  329.     XOPT+21,YOPT+35,    /* XY origin relative to container TopLeft */
  330.     NULL,    /* font pointer or NULL for default */
  331.     (UBYTE *)"Select Years",    /* pointer to text */
  332.     &IText8    /* next IntuiText structure */
  333. };
  334.  
  335. struct IntuiText IText6 = {
  336.     3,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  337.     XOPT+8,YOPT+17,    /* XY origin relative to container TopLeft */
  338.     &TOPAZ60,    /* font pointer or NULL for default */
  339.     (UBYTE *)"SELECT OPTIONS",    /* pointer to text */
  340.     &IText7    /* next IntuiText structure */
  341. };
  342.  
  343. #define IntuiTextList1 IText6
  344.  
  345.  
  346.  
  347. /*
  348.  * Text for error messages in option window 
  349.  */
  350. struct IntuiText ErrText1 = {
  351.     2,1,JAM2,    /* front and back text pens, drawmode and fill byte */
  352.     XOPT+10,YOPT+5,    /* XY origin relative to container TopLeft */
  353.     NULL,    /* font pointer or NULL for default */
  354.     (UBYTE *)"Invalid Start Year",    /* pointer to text */
  355.     NULL    /* next IntuiText structure */
  356. };
  357.  
  358. struct IntuiText ErrText2 = {
  359.     2,1,JAM2,    /* front and back text pens, drawmode and fill byte */
  360.     XOPT+10,YOPT+5,    /* XY origin relative to container TopLeft */
  361.     NULL,    /* font pointer or NULL for default */
  362.     (UBYTE *)"Invalid End Year",    /* pointer to text */
  363.     NULL    /* next IntuiText structure */
  364. };
  365.  
  366. struct IntuiText ErrText3 = {
  367.     2,1,JAM2,    /* front and back text pens, drawmode and fill byte */
  368.     XOPT+4,YOPT+5,    /* XY origin relative to container TopLeft */
  369.     NULL,    /* font pointer or NULL for default */
  370.     (UBYTE *)"End less than Start",    /* pointer to text */
  371.     NULL    /* next IntuiText structure */
  372. };
  373.  
  374. /* end of PowerWindows source generation */
  375.